﻿@model ListViewModel<CommonSearchValues, IQueryable<SmsSent>>
@{
    ViewBag.Title = "发送短信查询";
}
@using (Ajax.BeginForm("SentSms", new AjaxOptions { HttpMethod = "Post", LoadingElementId="OnLoadingSpan",UpdateTargetId = "ListView", OnFailure = "OnSiteError" }))
{<p>
    <fieldset>
        <legend>
            <div class="catalog-title">
                系统短信查询</div>
        </legend>
        @Html.HiddenFor(m => Model.PageSize)
       <input type="hidden" name="PageIdx" id="qspidx" value="0" />
        发送时间：@Html.EditorFor(m => m.SearchFrom.V1, "DateTimeStr")
        至：@Html.EditorFor(m => m.SearchTo.V1, "DateTimeStr")
        @Helpers.SubmitButton("查询", "qssubmit")
    </fieldset>
    </p>
}

<table class="width">
    <tr>
        <th>
            发送者
        </th>
        <th>
            接收方
        </th>
        <th>
            接收方电话
        </th>
        <th>
            短信内容
        </th>
        <th>
            发送时间
        </th>
        <th>
            状态
        </th>
    </tr>
    @{int dColor = 0;}
    @foreach (var item in Model.Data)
    {
        <tr class="tr-backColor@(dColor++%2)">
            <td>@Html.DisplayFor(model => item.SenderName)
            </td>
            <td>@Html.DisplayFor(model => item.ReceiverName)
            </td>
            <td>@Html.DisplayFor(model => item.ReceiverCode)
            </td>
            <td>@Html.DisplayFor(model => item.TextMessage)
            </td>
            <td>@Html.DisplayFor(model => item.SentTime)
            </td>
            <td>@Html.DisplayFor(model => item.ProcStatus)
            </td>

        </tr>
    }
</table>

@Html.Partial("Pagger", new PaggerViewModel { Act = "SentSms", PageIdx = Model.PageIdx, PageCount = Model.PageCount, ItemCount = Model.ItemCount })
@Html.Partial("TrHilighter")